home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / CRS / crs03.d81 / cad.sfx / A (.txt) < prev    next >
Commodore BASIC  |  1990-02-12  |  1KB  |  44 lines

  1. 1 GOTO16
  2. 2 GETA$:IFA$=""THEN10
  3. 3 IFA$>"/"ANDA$<":"THENSF=VAL(A$)-SS*(A$="0"):GOTO10
  4. 4 IFA$="[147]"THENSYS36888:GOTO10
  5. 5 IFA$="!"THENSYS36867:GOTO10
  6. 6 IFA$="="THENSYS36882:GOTO10
  7. 7 IFA$="&"THENSYS36879:GOTO10
  8. 8 IFA$=""THENSYS36885:GOTO10
  9. 9 A=USR(33),0:LOAD"CMND",D0
  10. 10 X=X+USR(121)*SF:Y=Y-USR(122)*SF
  11. 11 IFX>331THENX=12
  12. 12 IFX<12THENX=331
  13. 13 IFY>239THENY=40
  14. 14 IFY<40THENY=239
  15. 15 A=USR(34),X,Y,0:A=USR(34),16,Y,6:A=USR(34),X,231,7:RETURN
  16. 16 A=USR(33),0:A=USR(34),0,Y,6:A=USR(34),X,255,7:A=USR(0),0,1,4
  17. 17 A=USR(21):A=USR(17):A=USR(19):A=USR(1)
  18. 18 PRINTCHR$(14)"[147][206][207][212][197]: [204]INES MUST BE HORIZONTAL AND/OR":PRINT"VERTICAL.":PRINT
  19. 19 PRINT:PRINT"[197]NTER THE LINE SEGMENT LENGTH IN DOTS."
  20. 20 A$="":INPUT"([211]IXTY [60] DOTS PER INCH.)";A$:PRINT:L=VAL(A$):IFL<1THENL=3
  21. 21 PRINT"[197]NTER THE SPACE LENGTH IN DOTS."
  22. 22 A$="":INPUT"([211]IXTY [60] DOTS PER INCH.)";A$:SP=VAL(A$):IFSP<1THENSP=3
  23. 23 PRINT"[147]":A=USR(0),1,7,14:A=USR(1):A=USR(16):OPEN15,D0,15,"I":CLOSE15
  24. 24 A=USR(32),0
  25. 25 GOSUB2:A=USR(117):IFA<>16THEN25
  26. 26 SYS36864:X1=X-12:Y1=Y-40:A=USR(34),X,Y,1:A=USR(32),1
  27. 27 A=USR(117):IFA<>0THEN27
  28. 28 GOSUB2:A=USR(117):IFA<>16THEN28
  29. 29 X2=X-12:Y2=Y-40:A=USR(34),X,Y,2:A=USR(32),2
  30. 30 A=USR(117):IFA<>0THEN30
  31. 31 IF(X1=X2)AND(Y1=Y2)THENA=USR(33),1:A=USR(33),2:GOTO16
  32. 32 IFX1=X2THEN35
  33. 33 IFY1=Y2THEN39
  34. 34 A=USR(33),1:A=USR(33),2:GOTO24
  35. 35 IFY2<Y1THENY3=Y2:Y2=Y1:Y1=Y3
  36. 36 Y3=Y1+L:IFY3>Y2THENY3=Y2
  37. 37 A=USR(66),X1,Y1,X1,Y3:Y1=Y3+SP+1:IFY1>=Y2THEN43
  38. 38 GOTO36
  39. 39 IFX2<X1THENX3=X2:X2=X1:X1=X3
  40. 40 X3=X1+L:IFX3>X2THENX3=X2
  41. 41 A=USR(66),X1,Y1,X3,Y1:X1=X3+SP+1:IFX1>=X2THEN43
  42. 42 GOTO40
  43. 43 A=USR(33),1:A=USR(33),2:GOTO24
  44.